home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-04-18 | 1.7 KB | 67 lines | [TEXT/KAHL] |
- /******************************************************************************
- CDLOGBrowser.c
-
- This is a subclass of CResBrowser that creates a TCL dialog
- when the user double-clicks on a DLOG resource.
-
- SUPERCLASS = CResBrowser
-
- Copyright © 1991 Symantec Corporation. All rights reserved.
-
-
- ******************************************************************************/
-
- #include "CDLOGBrowser.h"
- #include "CDLOGDirector.h"
- #include "Global.h"
- #include "CApplication.h"
- #include "CDesktop.h"
-
- extern CDesktop *gDesktop;
- extern CApplication *gApplication;
-
- /******************************************************************************
- IDLOGBrowser
-
- Initialize the CDLOGBrowser. No special initialization is needed, so
- we just call the superclass's initialization method.
-
- ******************************************************************************/
-
- void CDLOGBrowser::IDLOGBrowser( CBrowseResDoc *aSupervisor, CArray *aResList)
- {
- CResBrowser::IResBrowser( aSupervisor, 'DLOG', aResList);
- }
-
- /******************************************************************************
- MakeResourceWindow
-
- Make resource window is called to make a window for an individual resource.
- We know the resource type is 'DLOG', so we make a TCL dialog window.
- ******************************************************************************/
-
- CDirector *CDLOGBrowser::MakeResourceWindow( tResourceInfo *aResource)
- {
- CDLOGDirector *dialog = NULL;
- short savedRes = CurResFile();
-
- TRY
- {
- dialog = new( CDLOGDirector);
-
- UseResFile( HomeResFile( aResource->resource));
- dialog->IDLOGDirector( aResource->ID, this);
-
- dialog->BeginDialog();
- }
- CATCH
- {
- UseResFile( savedRes);
- ForgetObject( dialog);
- }
- ENDTRY;
-
- UseResFile( savedRes);
-
- return dialog;
- }